package club.creategeek.ctrl.mq;

import com.tongze.common.mq.model.AppPushMQ;
import com.tongze.common.mq.vender.IMQSender;
import com.tongze.common.oss.service.OssService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 提现结算记录表
 *
 * @author xiaoyu
 * @site https://www.jeequan.com
 * @date 2022/3/21 10:00
 */
@RestController
@RequestMapping("/mq")
public class MqController {

    @Resource
    private OssService ossService;

    @Resource
    private IMQSender mqSender;

    @GetMapping()
    public String detail() {
        String aa =  ossService.uploadFile(null);
        System.out.println(aa);
        return "hello";
    }

    @RequestMapping(value = "/send", method = RequestMethod.GET)
    public String sendMq() {
        mqSender.send(AppPushMQ.build("你好世界"));
       return "success";
    }




}
